<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<!-- 订单页面 -->

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<jsp:include page="head.jsp" />
<body class="page-body">
<jsp:include page="nav.jsp" />

                    
                        
          <div class="page-title">
          <div class="title-env">
            <h1  class="title">我的订单</h1>
            <p class="description">此处可以查看你的订单</p>
          </div>
            <div class="breadcrumb-env">
            
               <ol class="breadcrumb bc-1">
                 <li>
                  <a href="#"><i class="fa-home"></i>首页</a>
                </li>
                <li class="active">
                      <strong>我的订单</strong>
                  </li>
              </ol>
                  
             </div>
           </div>

            <div  class="row">
                <div class="col-sm-12">
                    
                  <div class="panel panel-default">
                    <div  class="panel-heading">
                      <h3 align="center" class="panel-title">订单信息</h3>
                      
                      <div class="panel-options">
                         </div>
                    </div>

                    <div class="panel-body">
   <p align="center" style="color:red;">${requestScope.Msg }</p>
                      <div class="table-responsive">
                      
                                  <table cellspacing="0" class="table table-small-font table-bordered table-striped">
                                    <!-- 表头 -->
                                      <thead align="center">
                                          <tr align="center">
                                            <th align="center">商品ID</th>
                                            <th>商品名称</th>
                                            <th >使用天数</th>
                                            <th>包含流量</th>
                                            <th >商品价格</th>
                                            <th>商品备注</th>
                                           
                                          </tr>
                                        
                                            <c:if test="${sessionScope.dd_list==null }">
                                            <tr>
                                                  <td  colspan="6"></td>
                                            </tr>
                                          <tr>
                                          
                                    <td colspan="6">暂时没有你的订单哦！<u><a href="${pageContext.request.contextPath }/management/user/buy.jsp">立即前往流量商店</a></u></td>
                                   </tr></c:if>
                                      </thead>
                                
                                      <tbody>
                                <!-- cforeach遍历list -->                   
                <c:forEach items="${sessionScope.dd_list }" var="i">
                                   
                                      <tr>
                                        <td>${i.id }</td>
                                        <td>${i.sname }</td>
                                        <td>${i.sdays }天</td>
                                        <td>${i.sll }MB</td>
                                        <td>${i.sprice }元</td>
                                        <td>${i.sbz }</td>
                                       
                                        </tr>
                               
                </c:forEach>                     
                                  </tbody>
                    
            </table></div></div></div></div></div>
              <c:if test="${sessionScope.dd_list!=null }">
              <form action="tjdd.jsp" method="post">
            <!-- 订单合计容器 -->
            
            
            <div  class="row">
                <div class="col-sm-12">
                    
                  <div class="panel panel-default">
                    <div  class="panel-heading">
                      <h3 align="center" class="panel-title">订单合计</h3>
                      
                      <div class="panel-options">
                         </div>
                    </div>

                    <div class="panel-body">
   <p align="center" style="color:red;">${requestScope.Msg }</p>
                      <div class="table-responsive">          
                      
        <table cellspacing="0" class="table table-small-font table-bordered table-striped">
                                    <!-- 表头 -->
                                   
                                          <tr align="center">
                                            <td align="center">商品总价</td>
                                            <td>总计天数</td>
                                            <td >总计流量</td>
                                          <td colspan="4">操作</td>
                                           
                                          </tr>
                                        
                                    
                                
                                  
                                <!-- cforeach遍历list -->                   
              
                                      <tr align="center">
                                        <td><input name='dd_p' type=hidden value="${sessionScope.dd_p }">${sessionScope.dd_p }元</td>
                                        <td><input name='dd_d' type=hidden value="${sessionScope.dd_d }">${sessionScope.dd_d } 天</td>
                                        <td><input name='dd_l' type=hidden value="${sessionScope.dd_l }">${sessionScope.dd_l } MB</td>
                                        <input name='dd_x' type=hidden value=".">
                                          <input name='username' type=hidden value="${sessionScope.username }">
                                       <td align="center">
                                       <button type="submit" class="btn btn-info">  提 交 订 单  </button>
                                       </td><td align="center">
                                        <a href="${pageContext.request.contextPath }/RemoveGwc?user=${sessionScope.username}&pass=${sessionScope.password}" onclick="javascript:alert('清空购物车成功！');" type="submit" class="btn btn-info">  清 空 订 单  </a>
                                       </td>
                                        </tr>
                               
                      
                                
                                  </table>
</div></div></div></div></div></form>
</c:if>
<jsp:include page="copy.jsp" />